//
//  Muse_ex_font.swift
//  Muse
//
//  Created by mac on 2022/12/6.
//

import UIKit

enum MuseFontStyle {
    case bold, medium, regular, semiBold, heavy, wide
    
    var name: String {
        switch self {
        case .bold:
            return "Montserrat-Bold"
        case .medium:
            return "Montserrat-Medium"
        case .regular:
            return "Montserrat-Regular"
        case .semiBold:
            return "Montserrat-SemiBold"
        case .heavy:
            return "SFProRounded-Heavy"
        case .wide:
            return "Audiowide-Regular"
        }
    }
}

extension CGFloat {
    
    var font_bold: UIFont? {
        UIFont(name: MuseFontStyle.bold.name, size: self)
    }
    
    var font_regular: UIFont? {
        UIFont(name: MuseFontStyle.regular.name, size: self)
    }
    
    var font_medium: UIFont? {
        UIFont(name: MuseFontStyle.medium.name, size: self)
    }
    
    var font_semiBold: UIFont? {
        UIFont(name: MuseFontStyle.semiBold.name, size: self)
    }
    
    var font_heavy: UIFont? {
        UIFont(name: MuseFontStyle.heavy.name, size: self)
    }
    
    var font_wide: UIFont? {
        UIFont(name: MuseFontStyle.wide.name, size: self)
    }

}
extension Double {
    
    var font_bold: UIFont? {
        UIFont(name: MuseFontStyle.bold.name, size: self)
    }
    
    var font_regular: UIFont? {
        UIFont(name: MuseFontStyle.regular.name, size: self)
    }
    
    var font_medium: UIFont? {
        UIFont(name: MuseFontStyle.medium.name, size: self)
    }
    
    var font_semiBold: UIFont? {
        UIFont(name: MuseFontStyle.semiBold.name, size: self)
    }
    
    var font_heavy: UIFont? {
        UIFont(name: MuseFontStyle.heavy.name, size: self)
    }
    
    var font_wide: UIFont? {
        UIFont(name: MuseFontStyle.wide.name, size: self)
    }
}
